package net.cloudcodex.client.character.view.panel;

import net.cloudcodex.client.campaign.view.CampaignsView.Message;
import net.cloudcodex.client.widgets.CharacterAvatar;

import com.google.gwt.event.dom.client.HasClickHandlers;
import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.Label;

public class CharacterInCampaignPanel extends FlowPanel {

	private final Label titleMsg = new Label();
	private Message message;
	private CharacterAvatar characterAvatar = new CharacterAvatar();

	public CharacterInCampaignPanel() {
		this.addStyleName("characterInCampaignPanel");
		this.add(characterAvatar);
	}

	public void addCharacter(Long id, String name, String icon,
			boolean isActiveCharacter) {
		characterAvatar.initComponent(icon, name, true);
		characterAvatar.setId(id);
		characterAvatar.isActiveCharacter(isActiveCharacter);
	}

	public void setMessage(Message message) {
		this.message = message;
	}

	public HasClickHandlers getCharacterAvatar() {
		return characterAvatar;
	}

}
